package com.study.demo.valid;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuhongzhen
 * @date 2022/4/26 13:03
 */
@RestController
@RequestMapping(value = "demo")
public class DemoController {

    @PostMapping(value = "testDoubleToInt")
    public String testDoubleToInt(@Validated @RequestBody DoubleToIntDto dto){


        return "123456";
    }
}
